<?php
/**
 * 公众号页单号相关推送
 * @author lss
 * 2017-05-23
 */
namespace soa\mp\push;

use soa\client;

class Waybill  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	public function logisticsChange($openid,$platform,$waybill,$brand,$logistics){
		if(empty($openid) || empty($platform) || empty($waybill) || empty($brand) || empty($logistics)){
			return [];
		}

		return $this->post("api/push/Waybill/logisticsChange",compact('openid','platform','waybill','brand','logistics'));
	}

	//驿站到件模板消息
	public function arrive($info){
		return $this->post("api/push/Waybill/arrive",[
			"openid" => $info["openid"],
			"address" => $info["address"],
			"mobile" => $info["mobile"],
			"time" => $info["time"],
			"dak_id" => $info["dak_id"],
		]);
	}
}